package me.wz.util.sdbc;

import java.util.List;

public class Page<T> extends Pagination {

    public Page(){}
    public Page(Pagination pagination) {
        this.setTotal(pagination.getTotal());
        this.setPageNum(pagination.getPageNum());
        this.setPageSize(pagination.getPageSize());
        this.setPageTotal(pagination.getPageTotal());
        this.setOrderBy(pagination.getOrderBy());
    }

    private List<T> items;

    public List<T> getItems() {
        return items;
    }

    public Page<T> setItems(List<T> items) {
        this.items = items;
        return this;
    }

    public boolean getHasMore(){ return getPageTotal() > getPageNum(); }
}
